package com.luo.backend.dto;

import java.util.List;
import java.util.Map;

/**
 * 商家评价公开列表响应DTO（包含统计信息）
 */
public class MerchantReviewPublicListResponse {
    
    private List<ReviewResponse> items;
    private Long total;
    private Integer page;
    private Integer pageSize;
    private ReviewStatistics statistics;  // 评价统计
    
    // 评价统计内部类
    public static class ReviewStatistics {
        private Long totalReviews;
        private Double averageRating;
        private Map<String, Long> ratingDistribution;  // 评分分布 {"1": 5, "2": 10, ...}
        
        public Long getTotalReviews() {
            return totalReviews;
        }
        
        public void setTotalReviews(Long totalReviews) {
            this.totalReviews = totalReviews;
        }
        
        public Double getAverageRating() {
            return averageRating;
        }
        
        public void setAverageRating(Double averageRating) {
            this.averageRating = averageRating;
        }
        
        public Map<String, Long> getRatingDistribution() {
            return ratingDistribution;
        }
        
        public void setRatingDistribution(Map<String, Long> ratingDistribution) {
            this.ratingDistribution = ratingDistribution;
        }
    }
    
    // Getters and Setters
    public List<ReviewResponse> getItems() {
        return items;
    }
    
    public void setItems(List<ReviewResponse> items) {
        this.items = items;
    }
    
    public Long getTotal() {
        return total;
    }
    
    public void setTotal(Long total) {
        this.total = total;
    }
    
    public Integer getPage() {
        return page;
    }
    
    public void setPage(Integer page) {
        this.page = page;
    }
    
    public Integer getPageSize() {
        return pageSize;
    }
    
    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
    
    public ReviewStatistics getStatistics() {
        return statistics;
    }
    
    public void setStatistics(ReviewStatistics statistics) {
        this.statistics = statistics;
    }
}

